package com.cnswhy.cloud.server.core.dao;

import com.cnswhy.cloud.common.core.base.mapper.SuperMapper;
import com.cnswhy.cloud.server.common.entity.enumeration.TransType;
import com.cnswhy.cloud.server.common.entity.enumeration.WalletType;
import com.cnswhy.cloud.server.core.entity.CustomerWallet;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * Mapper 接口
 * 
 * </p>
 *
 * @author cnswhy
 * @date 2020-10-14
 */
@Repository
public interface CustomerWalletMapper extends SuperMapper<CustomerWallet> {
    @Select("select ifnull(sum(t.avlb_balance + t.fronzen_balance),0) from t_customer_wallet t where wallet_type = #{walletType}")
    Long getSumBalanceByWalletType(@Param("walletType") WalletType walletType);

}
